<template>
	<view class="userserver">
		<Hearder :name="'用户服务协议'" v-if="ll==1 && type==0"></Hearder>
		<Hearder :name="'隐私政策'" v-if="ll==2 && type==0"></Hearder>
		<Hearder :name="'认证服务'" v-if="ll==3 && type==0"></Hearder>
		<Hearder :name="'提现规则'" v-if="ll==4 && type==0"></Hearder>
		<Hearder :name="'关于我们'" v-if="ll==5 && type==0"></Hearder>
		<view class="content">
			<view class="tiaoyue" v-if="ll==1">
				<view><u-parse :previewImg="false" :content="data.service_agreement"></u-parse></view>
			</view>
			<view class="tiaoyue" v-if="ll==2">
				<view><u-parse :previewImg="false" :content="data.after_sales_agreement"></u-parse></view>
			</view>
			<view class="tiaoyue" v-if="ll==3">
				<view><u-parse :previewImg="false" :content="data.authentication_agreement"></u-parse></view>
			</view>
			<view class="tiaoyue" v-if="ll==4">
				<view><u-parse :previewImg="false" :content="data.withdrawal_rules"></u-parse></view>
			</view>
			<view class="tiaoyue" v-if="ll==5">
				<view><u-parse :previewImg="false" :content="data.aboutus_agreement"></u-parse></view>
			</view>
			<!-- <view class="regisBtn" @click="toPage" v-if="type==0">我知道了</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				ll:'',
				data:{},
				type:0
			}
		},
		onLoad(options) {
			this.ll= options.ll || this.$route.query.ll
			if(options.type){
				this.type= options.type || this.$route.query.type
			}
			this.request('/index/getAgreement').then(res => {
				if(res.data.code==1){
					  this.data=res.data.data
				}else{
					this.$tip(res.data.res);
				}
			})
		},
		methods:{
			toPage(){
				uni.navigateTo({
					url: 'login'
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.userserver{
		.content{
			margin: 30rpx 4% 0;
		}
		.tiaoyue view{
			line-height: 35rpx;
		}
		.regisBtn{
			margin: 30rpx 6% 0;
			height: 88rpx;
			line-height: 88rpx;
			color: #fff;
			text-align: center;
			background: $uni-item-color;
			border-radius: 10rpx;
		}
	}
</style>
